<template>
<div>
  <li class="list-group-item">
    <div class="handle">
      <a href="javascript:;" @click="removeItem">删除</a>
    </div>
    <p class="user"><span>{{comment.name}}</span><span>说:</span></p>
    <p class="centence">{{comment.content}}</p>
  </li>
</div>
</template>

<script>
export default {
  name: 'Item',
  components: {},
  props: {
    comment: {
      type: Object,
      required: true
    },
    removeComment:Function,
    index: Number
  },
  data() {
    return {}
  },
  methods: {
    removeItem() {
    //    删除
      const {index} = this
      this.removeComment(index)
    }
  }
}
</script>

<style scoped>

</style>
